<!DOCTYPE html>
<html>
<head>
    <base href="/task/">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title></title>
    <meta name="keywords" content=""/>
    <meta name="description" content="v"/>
    <meta name="author" content="hermit"/>
    <link rel="stylesheet" href="js/plugin/layui/css/layui.css">
    <link rel="stylesheet" href="js/plugin/ztree/zTreeStyle/zTreeStyle.css">
    <link rel="stylesheet" href="//at.alicdn.com/t/font_579508_vu0braww68.css">
    <link rel="stylesheet" href="css/build/common.css">
    <script src="js/plugin/jquery-2.2.4.min.js"></script>
    
</head>
<body class="layui-layout-body" style="min-width: 1300px;">
<div id="dow" onclick="getCookie('channel_code')">
 获取cookie 
</div>
  
  
  <script type="text/javascript">

  function getCookie(name) {
      var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)");
      if(arr=document.cookie.match(reg)){
    	  alert(unescape(arr[2]));
          return unescape(arr[2]);
      }else{
          return null;
      }
  }
  
  function GetQueryString(name) {
		var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
		var r = window.location.search.substr(1).match(reg);
		if (r != null)
			return unescape(r[2]);
		return null;
	}
  </script>
</body>
</html>